package client;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;

import javax.swing.DefaultListModel;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.border.LineBorder;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;



import events.LoginEventListener;
import events.LoginEvent;

import control.Login;

//import entities.Employee;

//import entities.User;

/**
  *GUI class for all the clients. 
 *This class handle all the events that return to the client
 *
 * @author Group 19
 * 
 * 
 */
public class MainJFrame extends javax.swing.JFrame  implements LoginEventListener{

    private Client client;
    private File file;
   
    
        /**
     * constructor that initializes all the GUI, and  all the listeners
     * @param tc - the client connection 
     */
    public MainJFrame(Client tc) {
    	this.client = tc;
    	this.client.login.addLoginListener(this);
       
        
        initComponents();
        
   
      
    }

    public MainJFrame() {
			// TODO Auto-generated constructor stub
		}

	/**
     * This method is called from within the constructor to initialize the form.
     */
    @SuppressWarnings("unchecked")
   
    private void initComponents() {
  //All the GUI will be here
    
        jButton1 = new javax.swing.JButton();
       

        
     
    }// </editor-fold>                        

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        // TODO add your handling code here:
    }                                        
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
       
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainJFrame().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify                     
   
    private javax.swing.JButton jButton1;


	@Override
	public void handleLoginEvent(LoginEvent e) {
		// TODO Auto-generated method stub
		
	}
   
    // End of variables declaration                   
    
}
